/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package day06;

/**
 *
 * @author Administrator
 */
public class TestAShape {

    public static void main(String[] agrs) {
        
        APoint p1 = new APoint(10, 11);
        APoint p2 = new APoint(11, 8);
        APoint p3 = new APoint(8, 4);
        
        AShape s1 = new ADot(p1, "white");
//     System.out.println(s1);
//     System.out.println(s1.dientich());
//     System.out.println(s1.chuvi());
        
       Circle c1 = new Circle(p2, "black", 10);
//     System.out.println("Dien tich = "+c1.dientich());
//     System.out.println("Chu vi ="+c1.chuvi());

        Rectangle r1 = new Rectangle(p3, "blue", 10, 4);
//      System.out.println("Dien tich =" + r1.dientich());
//      System.out.println("Chu Vi = " + r1.chuvi());

        /*
         * Tao ra 1 mang 5 cai hinh, in cac hin ra va tinh chu vui 
         * dien tich
         */
        AShape[] shapes = new AShape[3];
        shapes[0] = s1;
        shapes[1] = r1;
        shapes[2] = c1;
        for (AShape ashape : shapes) {
            System.out.println(ashape);
            System.out.println(ashape.dientich());
            System.out.println(ashape.chuvi());
        }











    }
}
